﻿using System.Windows;
using GalaSoft.MvvmLight.Command;
using GalaSoft.MvvmLight.Messaging;
using Tp.Interfaces;
using Tp.Interfaces.Commands;

namespace Tp.TreeViewModel
{
	public class TreeViewModelCommands : ITreeViewModelCommands
	{
		#region Properties
		public RelayCommand<FrameworkElement> ChangeViewCommand { get; set; }
		#endregion

	    #region C-Tor
		public TreeViewModelCommands()
		{
			this.RegisterCommands(); 					
		}
		#endregion

		#region Private methods
		private void RegisterCommands()
		{
            this.ChangeViewCommand = new RelayCommand<FrameworkElement>(OnExecuteChangeView);
		}
	    #endregion

		#region Commands
        private void OnExecuteChangeView(FrameworkElement view)
		{
            Messenger.Default.Send(view);
		}
		#endregion
	}
}
